<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.ik.pbs.conection.ConexionDB"%>
<%@page import="com.ik.pbs.Manejadores.ManejadorPais"%>
<%@page import="com.ik.pbs.Encapsulados.Pais"%>
<%@include  file="/Recursos/header.jsp"%>    

<%

    try {

%>

<!-- content -->  
<div class="wrapper row3">  
    <div id="container"> 
        <!-- ################################################################################################ -->
        <div class="one_quarter"style="text-align: right">
            <img src="/PBS/Recursos/images/candado.jpg" alt="" />
        </div>
        <div class="three_quarter">

            <h3>Cambio de contrase&ntilde;a</h3>
            <form action="/PBS/cambioContrasena" method="post" id="validar">
                <div class="clear"></div>
                <%
                    if (request.getParameter("error") != null && request.getParameter("error").equals("1")) {
                %>
                <div class="one_fifth">
                    <b>Contrase&ntilde;a actual:</b>
                </div>
                <div class="one_half">
                    *<input type="password" name="vieja" value="" class="required text one_half" style="background-color: #ff0000"> 
                </div> 
                <br/><br/>
                <%} else {%>
                <div class="one_fifth">
                    <b>Contrase&ntilde;a actual:</b>
                </div>
                <div class="one_half">
                    *<input type="password" name="vieja" value="" class="required text one_half">
                </div> 
                <br/><br/>
                <%}
                    if (request.getParameter("error") != null && request.getParameter("error").equals("2")) {
                %>
                <div class="one_fifth"> 
                    <b>Nueva contrase&ntilde;a:</b> 
                </div> 
                <div class="one_half"> 
                    *<input type="password" name="nueva" class="required text one_half" style="background-color:  #ff0000">
                </div>
                <br/><br/>
                <div class="one_fifth"> 
                    <b>Confirmar nueva contrase&ntilde;a:</b> 
                </div> 
                <div class="one_half"> 
                    *<input type="password" name="confirmar" class="required text one_half" style="background-color:  #ff0000">
                </div>
                <br/><br/>
                <br/>
                <%} else {%>
                <div class="one_fifth"> 
                    <b>Nueva contrase&ntilde;a:</b> 
                </div> 
                <div class="one_half"> 
                    *<input type="password" name="nueva" class="required text one_half">
                </div>
                <br/><br/>
                <div class="one_fifth"> 
                    <b>Confirmar nueva contrase&ntilde;a:</b> 
                </div> 
                <div class="one_half"> 
                    *<input type="password" name="confirmar" class="required text one_half">
                </div>
                <br/><br/>

                <%}%>     
                <%if (request.getParameter("error") != null && request.getParameter("error").equals("1")) {%>
                <div class="alert-msg rnd8 error two_fifth">Su contrase&ntilde;a actual no coincide con la digitada.</div>
                <br/><br/>
                <br/>
                <%} else if (request.getParameter("error") != null && request.getParameter("error").equals("2")) {%>
                <div class="alert-msg rnd8 error two_fifth">Las contrase&ntilde;as nuevas no coinciden.</div>
                <br/><br/>
                <br/>
                <%} else if (request.getParameter("error") != null && request.getParameter("error").equals("0")) {%>
                <div class="alert-msg rnd8 success two_fifth">Su contrase&ntilde;a se cambio con exito!</div>
                <br/><br/>
                <br/>
                <%} else if (request.getParameter("error") != null && request.getParameter("error").equals("3")) {%>
                <div class="alert-msg rnd8 warning two_fifth">No se pudo cambiar la contrase&ntilde;a. Favor notificar al administrador.</div>
                <br/><br/>
                <br/>
                <%}%>

                
                <br/>
                <div class="two_fifth" style="text-align: center"> 
                    <button type="submit" class="button small gradient black"> 
                        <span class="icon-save"></span>  Guardar 
                    </button>
                    <button type="reset" class="button small gradient black">
                        <span class="icon-spinner"></span>  Limpiar
                    </button>
                </div>
            </form>

            <div class="clear"></div>
        </div>
        <!-- ################################################################################################ -->
        <div class="clear"></div>
    </div>
</div>
<!-- Footer -->
<%@include  file="/Recursos/footer.jsp"%> 
<%
    } catch (Exception e) {

        System.out.println(e.getMessage());
    }


%>